<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateModuleTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('module', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->increments('id');
            $table->string('name',100)->unique()->index()->null()->default('')->comment('标签名称');
            $table->tinyInteger('type')->null()->default('0')->comment('type代表这个模块属于那一个页面');
            $table->string('img', 255)->null()->default('')->comment('模块图片');
            $table->string('adress', 255)->null()->default('')->comment('模块地址');


        });

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('module');
    }
}
